package bar.dark.lee.select;

import java.util.ArrayList;

import android.os.Parcel;
import android.os.Parcelable;

public class CheckDate implements Parcelable
{
	private int year;
	private int month;
	private ArrayList<String> selectDate = new ArrayList<String>();
	private ClassLoader loader = ArrayList.class.getClassLoader();

	public CheckDate(){};
	
	public CheckDate(Parcel source)
	{
		this.year = source.readInt();
		this.month = source.readInt();
		this.selectDate = source.readArrayList(loader);
	}

	@Override
	public int describeContents()
	{
		return 0;
	}
	
	@Override
	public void writeToParcel(Parcel dest, int flags)
	{
		dest.writeInt(this.getYear());
		dest.writeInt(this.getMonth());
		dest.writeList(this.getSelectDate());
	}
	
	public static Parcelable.Creator<CheckDate> CREATOR = new Creator<CheckDate>()
	{
		@Override
		public CheckDate[] newArray(int size)
		{
			return new CheckDate[size];
		}
		
		@Override
		public CheckDate createFromParcel(Parcel source)
		{
			return new CheckDate(source);
		}
	};
	
	
	
	public CheckDate(int year, int month, ArrayList<String> selectDate) {
		this.year = year;
		this.month = month;
		this.selectDate.addAll(selectDate);
	}
	
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
	}
	public ArrayList<String> getSelectDate() {
		return selectDate;
	}
	public void setSelectDate(ArrayList<String> selectDate) {
		this.selectDate = selectDate;
	}
}
